//: typeinfo/toys/GenericToyTest.java
// Testing class Class.
package cn.feng.thinkInJava.a9_1_类型信息.typeinfo.toys.a14_02_00;

public class GenericToyTest
{
	public static void main(String[] args) throws Exception
	{
		Class<FancyToy> ftClass=FancyToy.class;
		// Produces exact type:
		FancyToy fancyToy=ftClass.newInstance();
		Class<? super FancyToy> up=ftClass.getSuperclass();
		// This won't compile:
		// Class<Toy> up2 = ftClass.getSuperclass();
		// Only produces Object:
		Object obj=up.newInstance();
	}
} ///:~
